# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py3-elasticsearch
_pkgname=elasticsearch-py
pkgver=7.1.0
pkgrel=0
pkgdesc="Official Python low-level client for Elasticsearch"
url="https://elasticsearch-py.readthedocs.io/"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-urllib3"
checkdepends="py3-requests py3-nose py3-coverage py3-mock py3-yaml py3-nosexcover"
makedepends="py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/elastic/elasticsearch-py/archive/$pkgver.tar.gz"
builddir="$srcdir/"$_pkgname-$pkgver

replaces="py-elasticsearch" # Backwards compatibility
provides="py-elasticsearch=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="af6dc6f200190e57d37d5c771da6cf9b3cbeee8f4bbffbe0b9466fe88496b9c45d44ef40c2d5379e4fa9cc54ce61c46b35a578e3ae99b82afeacd132bf2c6ad6  py3-elasticsearch-7.1.0.tar.gz"
